<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1">
        <title>高速公路交通监控系统</title>
		<link rel="stylesheet" href="css/style.css" />
		<link rel="stylesheet" href="css/traffic.css" />
		<link rel="stylesheet" href="css/logo.css" />
        <link href="css/sweetalert.css" rel="stylesheet" />
        <link rel="shortcut icon" href="images/bitbug_favicon.ico" >        
	</head>
	
	<body>
		<div class="logo_container">
		<header>
			<p>川口至大河家道路监控软件</p>		
		</header>
		<div class="section-main">
			<p class="con_img"><img src="images/stat/login_icon.png" alt=""/></p>
				<div class="logo_conter">
					<div class="login_input">
						<div class="login-panel centerY">
						<h1 class="login_h1">账号登录</h1>
						<form method="post" action="/" class="form_coner">
							<div class="account">
								<p ><label></label><input type="text" class="p_l" id="loginname" placeholder="用户名"/></p>
								<p ><label></label><input type="password" class="p_l" id="password" placeholder="密码"/></p>
							</div>
						<!--	<p class="logo_pwd "><em></em>记住密码</p>-->
							<p class="login_but" style="cursor:pointer" onclick="Login()">登录</p>
							<!--<p class="logo_pwd_wangj"><em>忘记密码</em></p>-->
                            	<!--<a class="login_but" href="register.html" style="cursor:pointer; display:block;text-decoration:initial">注册</a>-->
						</form>
					</div>
					</div>
				</div>

		</div>
		<div class="login_foot">
			<p>© 2005-2016 江西方兴科技有限公司 版权所有</p>
		</div>
		</div>
	</body>
	<script src="js/jquery-1.10.2.min.js"></script>
    <script src="js/sweetalert.min.js"></script>
	<script>
		$(function(){
			$(".logo_pwd em").bind("click",function(){
				if(!$(this).hasClass("logo_pwd_hover")){
				$(this).addClass("logo_pwd_hover");
				}else{
					$(this).removeClass("logo_pwd_hover");
				}
			});          
		});
		function Login() {
		    $.post("/JTJK/Ashx/Login.ashx", { type: "Login", loginname: $("#loginname").val(), password: $("#password").val() }, function (data) {
		        if (data == "True") {
		            location.href = "/JTJK/traffic/html_home/index.html#/indexMap";
		        } else {
		            swal(data);
		            $("#loginname").val("");
		            $("#password").val("");
		        }		        
		    })
		}
	</script>
</html>
